import request from '@/utils/request'


export function getProjectDetailData(pid){
  return request({
    url:'/get/project/detail/info/'+pid,
    method:'get'
  })
}

export function getProjectTimeData(pid){
  return request({
    url:'/get/project/time/line/'+pid,
    method:'get'
  })
}

export function gettasks(url){
  return request({
    url: url,
    method: 'get'
  })
}

export function getrequirements(url){
  return request({
    url: url,
    method: 'get'
  })
}
export function getflaws(pid){
  return request(({
    url: "get/flaws/"+pid,
    method: 'get'
  }))
}

export function getact(pid){
  return request(({
    url: "get/act/"+pid,
    method: 'get'
  }))
}

export function getProjectCategoryByCategory(){
  return request({
    url:'/get/project/category/by/category',
    method:'get'
  })
}

export function getProjectAmountByMonth(){
  return request({
    url:'/get/project/amount/by/month',
    method:'get'
  })
}

export function getsortByCategory(){
  return request({

    url:'/get/project/sortbycategory',
    method:'get'
  })
}

export function getsortByPriority(){
  return request({

    url:'/get/project/sortbypriority',
    method:'get'
  })
}


export function getProjectAreaInfos(){
  return request({
    url:'/get/project/by/area',
    method:'get'
  })
}


export function getProjectNums(){
  return request({
    url:'/get/project/nums',
    method:'get'
  })
}



export function getUserRoles(url){
  return request({
    url:url,
    method:'get'
  })
}

export function addGroupToProject(url){
  return request({
    url:url,
    method:"post"
  })
}

export function getProjectList(url){

  return request({
    url: url,
    method: 'get'
  })
}

export function updateProjectByPId(url){
  return request({
    url: url,
    method:'get'
  })
}

export function getChoiceList(url){
  return request({
    url: url,
    method:'get'
  })
}



export function serchByParams(params){
  return request({
    url:'/get/projects/by/params',
    method:'post',
    data:params
  })
}

export function addProject(params){
  return request({
    url:'/add/new/project',
    method:'post',
    data:params
  })
}
export function getProjectProgressInfo(pid) {
  return request({
    url: '/get/project/progress/' + pid,
    method: 'get'
  })
}

export function getProjectDateInfo(id) {
  return request({
    url: '/get/project/date/' + id,
    method: 'get'
  })
}
